﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/News.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Dto" %>
<%@ Import Namespace="Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h2 class="newstitle">共为您搜索出<%:  ViewBag.NewsCount==null?"":ViewBag.NewsCount %>条包含"<%: ViewBag.SearchKeyword ==null?"":ViewBag.SearchKeyword %>"关键字的搜索结果：</h2>
  
   <ul>
    <%
        IList<Dto.NewsDto> news = (ViewBag.NewsList as IList<Dto.NewsDto>);
        if(news !=null)
        {
                      
            foreach (Dto.NewsDto s in news)
            {
                %>
              <li> 
                <a class="newstitlebold" href="<%:Url.Action("Index","News",new {newsid=s.Id}) %>" > <%: s.Title %> </a> 
                <br />
                <span> <% Response.Write(Common.HtmlHelper.checkStr(s.Content.Substring(s.Content.IndexOf(ViewBag.SearchKeyword), s.Content.Length - s.Content.IndexOf(ViewBag.SearchKeyword) > 100 ? 100 : s.Content.IndexOf(ViewBag.SearchKeyword))));%></span>
              </li>
                <%
            }
            
        }
     %>
   </ul>
  
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<title>大连旅游职业中专站内搜索-<%: ViewBag.SearchKeyword ==null?"":ViewBag.SearchKeyword %> </title>
</asp:Content>
